package com.ruoyi.report.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.report.mapper.PwReportMapper;
import com.ruoyi.report.domain.PwReport;
import com.ruoyi.report.service.IPwReportService;

/**
 * 举报有奖Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-07-26
 */
@Service
public class PwReportServiceImpl implements IPwReportService 
{
    @Autowired
    private PwReportMapper pwReportMapper;

    /**
     * 查询举报有奖
     * 
     * @param id 举报有奖主键
     * @return 举报有奖
     */
    @Override
    public PwReport selectPwReportById(Long id)
    {
        return pwReportMapper.selectPwReportById(id);
    }

    /**
     * 查询举报有奖列表
     * 
     * @param pwReport 举报有奖
     * @return 举报有奖
     */
    @Override
    public List<PwReport> selectPwReportList(PwReport pwReport)
    {
        return pwReportMapper.selectPwReportList(pwReport);
    }

    /**
     * 新增举报有奖
     * 
     * @param pwReport 举报有奖
     * @return 结果
     */
    @Override
    public int insertPwReport(PwReport pwReport)
    {
        pwReport.setCreateTime(DateUtils.getNowDate());
        return pwReportMapper.insertPwReport(pwReport);
    }

    /**
     * 修改举报有奖
     * 
     * @param pwReport 举报有奖
     * @return 结果
     */
    @Override
    public int updatePwReport(PwReport pwReport)
    {
        pwReport.setUpdateTime(DateUtils.getNowDate());
        return pwReportMapper.updatePwReport(pwReport);
    }

    /**
     * 批量删除举报有奖
     * 
     * @param ids 需要删除的举报有奖主键
     * @return 结果
     */
    @Override
    public int deletePwReportByIds(Long[] ids)
    {
        return pwReportMapper.deletePwReportByIds(ids);
    }

    /**
     * 删除举报有奖信息
     * 
     * @param id 举报有奖主键
     * @return 结果
     */
    @Override
    public int deletePwReportById(Long id)
    {
        return pwReportMapper.deletePwReportById(id);
    }
}
